package com.yisu.auction.api.core.mapper;

import com.yisu.auction.api.domain.request.rechargePackage.RechargeRequest;
import com.yisu.auction.ewf.entity.Recharge;
import org.apache.ibatis.annotations.Param;

public interface RechargeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Recharge record);

    int insertSelective(Recharge record);

    Recharge selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Recharge record);

    int updateByPrimaryKey(Recharge record);


    /**
     * author: 赵杰
     * Business Description：通过订单号查询充值记录
     *
     * @param rechargeRequest
     * @return
     */
    Recharge selectByOrderId(RechargeRequest rechargeRequest);


    /**
     * author: 赵杰
     * Business Description：更新充值状态
     * @param id ID
     * @return
     */
    int updateRechargeStatus(Long id);


    /**
     * author: 赵杰
     * Business Description：通过订单号获取充值订单信息
     * @param orderId
     * @return
     */
    Recharge getRechargeOrderByOrderId(@Param("orderId") String orderId);
}